package com.ysd.lis.controller.lab;

import com.ysd.common.Result;
import com.ysd.lis.annotation.LogDetail;
import com.ysd.lis.aspect.OperationType;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabItemDict;
import com.ysd.lis.request.ItemMapperDto;
import com.ysd.lis.request.RptGroupInstrDto;
import com.ysd.lis.request.RptGroupPageParam;
import com.ysd.lis.request.TransResultDto;
import com.ysd.lis.service.lab.LabMapperItemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 项目和项目之间的关联关系表(合并标本用) 前端控制器
 * </p>
 *
 * @author wanghuaixing
 * @since 2024-12-27
 */
@RestController
@RequestMapping("/lab/mapper/item")
public class LabMapperItemController extends BaseController {

    @Autowired
    LabMapperItemService labMapperItemService;
    @ApiOperation("查询项目关联的其他项目")
    @GetMapping("/findMapperItem")
    public Result findMapperItem(LabItemDict labItemDict) {
        return labMapperItemService.findMapperItem(labItemDict);
    }

    @ApiOperation("获取当前项目没有关联的项目")
    @GetMapping("/findItemsByRptGroup")
    public Result findItemsByRptGroup(RptGroupPageParam param) {
        return labMapperItemService.findItemsByRptGroup(param);
    }

    @ApiOperation("批量维护对照关系")
    @PostMapping("/batchMapperItemList")
    public Result batchMapperItemList(@RequestBody ItemMapperDto dto) {
        return labMapperItemService.batchMapperItemList(dto);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteMapperItem")
    public Result batchDeleteMapperItem(@RequestBody ItemMapperDto dto){
        return  labMapperItemService.batchDeleteMapperItem(dto);
    }

}
